home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks96
/
FlyPaper.sit
/
Fly Paper
/
FlyPaper Source
/
Installer Sources
/
FlyPaperInstaller.c
next >
Wrap
C/C++ Source or Header
|
1996-06-22
|
795b
|
39 lines
#include "FlyPaperINIT.h"
#include <stdio.h>
#include <SIOUX.h>
void main (void)
{
FlyPaperGestaltPtr data;
short flyPaperRes;
Handle newCode;
SIOUXSettings.asktosaveonclose = false;
if (Gestalt (kSignature, (long*) &data)) {
printf ("INIT wasn't loaded, can't install");
return;
}
flyPaperRes = OpenResFile ("\pFlyPaper");
if (flyPaperRes < 0) {
printf ("Couldn't open \"FlyPaper\". Must be in same directory");
return;
}
UseResFile (flyPaperRes);
newCode = Get1Resource (kFlyPaperResType, kFlyPaperResID);
if (!newCode) {
printf ("Couldn't load code.");
return;
}
DetachResource (newCode);
data -> enabled = false;
if (data -> flyPaperCode)
DisposeHandle (data -> flyPaperCode);
data -> flyPaperCode = newCode;
data -> enabled = true;
}